<template>
	<view class="bgf8">
		<wuc-tab :tab-list="tabList" :tabCur.sync="TabCur" @change="tabChange" textFlex style="margin-bottom: 20upx;">
		</wuc-tab>
		<view class="tabchange">
			<Tab2 v-if="TabCur == 0"></Tab2>
			<Tab3 v-else></Tab3>
		</view>
	</view>
</template>

<script>
	import WucTab from '@/components/wuc-tab/wuc-tab.vue';
	import Tab2 from './components/tab2.vue';
	import Tab3 from './components/tab3.vue';
	export default {
		components: {
			WucTab,
			Tab2,
			Tab3
		},
		data() {
			return {
				TabCur: 0,
				tabList: [{
					name: '常用处方'
				}, {
					name: '经典处方'
				}],
			}
		},
		methods: {
			tabChange(index) {
				if (this.TabCur == index) return;
				this.TabCur = index;
			}
		}
	}
</script>

<style lang="scss" scoped>
	page {
		background: #f8f8f8;
	}

	.tabchange {
		height: calc(100% - 132upx);
	}
</style>
